#!/bin/bash
backup_dir="/tmp/$(date +"%Y%m%d")"
mkdir -p $backup_dir

for file in "$1"/*
do
  if [ -f "$backup_dir/$file" ]
  then
    echo "exit!"
    continue
  else
    cp "$file" "$backup_dir/$file"
    echo "备份成功"
  fi
done  



